package org.example.myleet.p1603;

/**
 * 10 ms
 */
public class ParkingSystem {

    private int[] counts;

    public ParkingSystem(int big, int medium, int small) {
        counts = new int[3];
        counts[0] = big;
        counts[1] = medium;
        counts[2] = small;
    }

    public boolean addCar(int carType) {
        if (counts[carType-1] < 1) {
            return false;
        }
        --counts[carType-1];
        return true;
    }
}
